package com.smartcat.web.actions;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Controller;

import com.smartcat.bean.LoginUserBean;
import com.smartcat.model.FunctionConfig;
import com.smartcat.web.BaseAction;
import com.smartcat.web.JspHelper;

@Controller
public class WorkAction extends BaseAction{

	@Override
	public String execute(){
		List<FunctionConfig> functions=JspHelper.getInstantce().loadFunctions();
		this.putToValueStack("functions", functions);
		LoginUserBean loginUser=(LoginUserBean)this.getSession().get("loginUser");
		Map<Integer,FunctionConfig> userFunction=JspHelper.getInstantce().loadUserFunction(loginUser);
		this.putToValueStack("userFunction", userFunction);
		return SUCCESS;
	}
	
	
}
